//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package javax.vpncrypto.spec;

import java.security.spec.AlgorithmParameterSpec;

public class IvParameterSpec implements AlgorithmParameterSpec {
    private byte[] iv;

    public IvParameterSpec(byte[] var1) {
        this(var1, 0, var1.length);
    }

    public IvParameterSpec(byte[] var1, int var2, int var3) {
        if (var1 == null) {
            throw new IllegalArgumentException("IV missing");
        } else if (var1.length - var2 < var3) {
            throw new IllegalArgumentException("IV buffer too short for given offset/length combination");
        } else if (var3 < 0) {
            throw new ArrayIndexOutOfBoundsException("len is negative");
        } else {
            this.iv = new byte[var3];
            System.arraycopy(var1, var2, this.iv, 0, var3);
        }
    }

    public byte[] getIV() {
        return (byte[])this.iv.clone();
    }
}
